﻿@model IEnumerable<PhotoBlogApp.Core.Album>
<div class="block">
    <p>
        @Html.ActionLink("Создать", "Create")
    </p>
    <table class="table">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.AlbumName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Description)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Hide)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Logo)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.User.Login)
            </th>
            <th></th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.AlbumName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Description)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Hide)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Logo)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.User.Login)
                </td>
                <td>
                    @Html.ActionLink("ред.", "Edit", new { id = item.AlbumId }) |
                    @Html.ActionLink("уд.", "Delete", new { id = item.AlbumId })
                </td>
            </tr>
        }

    </table>
    @Html.ActionLink("На главную", "Index", "Root")
</div>
